﻿namespace UFIDA.U9.Cust.SH.SHFastShipBP
{
	using System;
	using System.Collections.Generic;
	using System.Text; 
	using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;
    using UFIDA.U9.Cust.SH.SHFastShipBP.SHFastShipBP;
    using UFIDA.U9.CBO.SCM.Item;

	/// <summary>
	/// GetAvailableQty partial 
	/// </summary>	
	public partial class GetAvailableQty 
	{	
		internal BaseStrategy Select()
		{
			return new GetAvailableQtyImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class GetAvailableQtyImpementStrategy : BaseStrategy
	{
		public GetAvailableQtyImpementStrategy() { }

		public override object Do(object obj)
		{						
			GetAvailableQty bpObj = (GetAvailableQty)obj;
			
			//get business operation context is as follows
			//IContext context = ContextManager.Context	
			
			//auto generating code end,underside is user custom code
			//and if you Implement replace this Exception Code...
			//throw new NotImplementedException();
            List<ItemInfoDTO> retlist = new List<ItemInfoDTO>();
            if (bpObj.ItemList.Count <= 0) return retlist;

            foreach (ItemQryDTO dto in bpObj.ItemList)
            {
                ItemInfoDTO qtydto = new ItemInfoDTO();
                qtydto.ItemID = dto.ItemID;
                qtydto.WH = dto.WH;
                qtydto.LotID = dto.LotID;

                PubTool.SetKitQty1(qtydto);

                retlist.Add(qtydto);
            }
            return retlist;
		}		
	}

	#endregion
	
	
}